import request from '@/utils/request'
// import { transformQueryCondition } from '@/utils'
// 复合检索
// const searchCon = transformQueryCondition(query)

// 网关请求路径
const gatewayPrefix = '/busiDemo'

// 业务请求路径
const busiPrefix = '/jbdpDemoCrud'

// 查询列表
export function selectList(args) {
  return request({
    url: gatewayPrefix + busiPrefix + '/select',
    method: 'POST',
    data: args
  })
}

// 通过主键查询
export function selectById(id) {
  return request({
    url: gatewayPrefix + busiPrefix + '/' + id,
    method: 'GET',
    data: {}
  })
}

// 新增保存
export function insert(args) {
  return request({
    url: gatewayPrefix + busiPrefix,
    method: 'POST',
    data: args
  })
}

// 编辑更新
export function update(id = '', args) {
  return request({
    url: gatewayPrefix + busiPrefix + '/' + id,
    method: 'PUT',
    data: args
  })
}

// 删除
export function remove(args, model = 'false') {
  return request({
    url: gatewayPrefix + busiPrefix + '/' + model,
    method: 'DELETE',
    data: args
  })
}
